<?php
class Model_Acl extends Zend_Acl
{
    public function __construct()
    {
        $this->addRole(new Zend_Acl_Role('guest'));
        $this->addRole(new Zend_Acl_Role('user'), 'guest');
        $this->addRole(new Zend_Acl_Role('blogger'), 'user');
        $this->addRole(new Zend_Acl_Role('admin'), 'blogger');
        $this->add(new Zend_Acl_Resource('posts'));

        $this->allow('guest', 'posts', 'view');

        $this->allow('blogger', 'posts', 'edit');
        $this->allow('blogger', 'posts', 'add');
    }
}